{% extends "main.html" %}

{% block content %}
<div class="content-box">
  <div class="content-box-header">
    <h3>My Payments</h3>
    <ul class="content-box-tabs">
      <li><a href="#tab1" class="default-tab">List</a></li>
    </ul>
    <div class="clear"></div>
</div>

<div class="content-box-content">
  <div class="tab-content default-tab" id="tab1">
      
      <table>
        <thead>
          <tr>
          
            <th>N.º of Receipt</th>
            <th>Profit</th>
            <th>Fraction</th>
            <th>Value</th>
            <th>Payment state</th>
            <th>Date</th>
            <th>Details</th>
            <th>Receipt</th>
          </tr>
        </thead>
	{% for receita in meusPagamentos %}
	  
	<tr> 
	  <td>{{receita.nrFactura}}</td>
	  <td>{{receita.get_receita_display }} </td>
	  <td>{{receita.fraccao}}</td>
	  <td>{{receita.valor}} €</td>
	  <td>{{receita.get_situacao_display}}</td>
	  <td>{{receita.data}}</td>
      <td>{{receita.obs}}</td>
	





	    <td>{% if receita.situacao = 1 %}<a href='{% url ver_receita object_id=receita.pk %}'>See Receipt</a>{% else %}Receipt not available{% endif %}</td>
        </tr> 
	{% endfor %}
      </table>
     
    </div>
  </div>
</div>
{% endblock %}
